<template>
    <div class="wrap">
        <b-header>
            <img src="../assets/imgs/icon-sign.png" alt="">
            <div>
                <span>书城</span>
                <span>书架</span>
            </div>
            <router-link to="/login">
                <img src="../assets/imgs/icon-person.png" alt="">
            </router-link>
        </b-header>
        <div class="con">
            <dl-item v-for="(item,i) in hot" :key="item.fiction_id"
                :url="item.cover"
                :title="item.title"
                :fiction_id="item.fiction_id"
            ></dl-item>
        </div>
    </div>
</template>
<script>
import bHeader from '../components/b-header'
import dlItem from '../components/dl-item'
export default {
    components:{
        bHeader,
        dlItem
    },
    data(){
        return {
            hot:[]
        }
    },
    created(){
        this.$http.get('/api/hot').then(res => {
            console.log(res);
            if(res.data.code === 1){
                this.hot = res.data.data.data.data;
                console.log(this.hot)
            }
        })
    }
}
</script>
<style lang="scss">

</style>

